package com.gugee.ins.data.blogger.es.config;


import com.gugee.ins.common.model.es.blogger.InsBlogger;
import com.gugee.ins.common.model.mysql.blogger.InsBloggerMain;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

import java.util.List;

@Mapper(componentModel = "spring")
public interface InsBloggerEsMapping {

    @Mapping(target = "followerGrowth", source = "lastFollowerGrow")
    @Mapping(target = "followerGrowthRate", source = "lastFollowerGrowRate")
    @Mapping(target = "engagementRate", source = "avgEr")
    InsBlogger mapper(InsBloggerMain insBloggerMain);

    List<InsBlogger> mapper(List<InsBloggerMain> insBloggerMains);
}
